package dryven.request.http;

import java.io.InputStream;
import java.util.HashMap;
import java.util.Map;

public abstract class AbstractRequest implements Request {

	@Override
	public Iterable<String> getAttributeNames() {
		return _attributes.keySet();
	}

	private Map<String, Object> _attributes;
	
	@Override
	public Object getAttribute(String name) {
		if(_attributes==null) {
			return null;
		}
		return _attributes.get(name);
	}
	
	@Override
	public void setAttribute(String name, Object value) {
		if(_attributes==null) {
			_attributes = new HashMap<String, Object>();
		}
		_attributes.put(name, value);
	}

}
